# @Time    : 2021/1/19 11:56
# @Author  : LDY
# @Email   : 274884591@qq.com
# @File    : woniusalesPom.py
# @desc    : woniusales的定位元素类
# @Software: PyCharm
from selenium.webdriver.support.wait import WebDriverWait
from Base.Decorator import get_parameters
from Base.openBrowser import OpenBrowser

from Config.Config import Dir


class WoniusalesPom:
    def __init__(self):
        self.dr = OpenBrowser.get_driver(Dir.WoniusalesUrl)
        self.wait = WebDriverWait(self.dr, 10, 0.5)

    @get_parameters("id", "username")
    def get_username_ele(self, ele):
        return ele

    @get_parameters("id", "password")
    def get_password_ele(self, ele):
        return ele

    @get_parameters("id", "verifycode")
    def get_verifycode_ele(self, ele):
        return ele

    @get_parameters("xpath", "/html/body/div[4]/div/form/div[6]/button")
    def get_loginbutton_ele(self, ele):
        return ele
